package com.qzsoft.zhjd.asphalt.modules.nAsphaltDataConfig.service.impl;

import com.qzsoft.system.common.Query;
import com.qzsoft.zhjd.asphalt.modules.nAsphaltDataConfig.entity.NAsphaltDataConfigEntity;
import com.qzsoft.zhjd.asphalt.modules.nAsphaltDataConfig.mapper.NAsphaltDataConfigMapper;
import com.qzsoft.zhjd.asphalt.modules.nAsphaltDataConfig.service.NAsphaltDataConfigService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;




@Service("nAsphaltDataConfigService")
public class NAsphaltDataConfigServiceImpl extends ServiceImpl<NAsphaltDataConfigMapper, NAsphaltDataConfigEntity> implements NAsphaltDataConfigService {

    @Autowired
    private NAsphaltDataConfigMapper nAsphaltDataConfigMapper;

    /**
     * 列表
     */
    @Override
    public IPage<NAsphaltDataConfigEntity> queryPage(Map<String, Object> params) {
        return nAsphaltDataConfigMapper.selectPage(new Query(params).getPage(),new QueryWrapper<NAsphaltDataConfigEntity>());
    }

    /**
     * 信息
     * @return NAsphaltDataConfigEntity
     */
    @Override
    public NAsphaltDataConfigEntity getInfo(Long id){
        return getById(id);
    }

    /**
     * 保存
     */
    @Override
    public void saveData(NAsphaltDataConfigEntity nAsphaltDataConfig){
        save(nAsphaltDataConfig);
    }

    /**
     * 修改
     */
    @Override
    public void updateData(NAsphaltDataConfigEntity nAsphaltDataConfig){
        updateById(nAsphaltDataConfig);
    }

    /**
     * 删除单条数据
     * @param id
     */
    @Override
    public void deleteOneData(Long id){
        removeById(id);
    }

    /**
     * 删除
     */
    @Override
    public void deleteData(List<Long> ids){
        removeByIds(ids);
    }
}
